package kr.hkit.powerjava.chapter06.submit;

import java.util.Scanner;

public class programming012 {
	public static void main(String[] args) {
		int a,b,c; // programming 01  방법2)
		int small = 0, mid = 0, large = 0 ;
		
		Scanner input = new Scanner (System.in);
		System.out.print("정수를 입력하시오: ");
		a = input.nextInt();
		System.out.print("정수를 입력하시오: ");
		b = input.nextInt();
		System.out.print("정수를 입력하시오: ");
		c = input.nextInt();
		
		if (a>b){
			if (b>c) {
				large = a; 
				mid = b; 
				small = c;
				
			} else if (a>c) {
				large = a;
				mid = c;
				small = b;
				} else {
					large= c;
					mid = a;
					small =b;
				}
			System.out.println("정렬된 숫자: " + small +" "+ mid +" "+ large);
		}
		else {
			 	if (b<c) {					
						large = c;
						mid = b;
						small = a;	
						
						} 
			 		else if (c>a) {
							large = b;
							mid = c; 
							small = a; 
							} else {
								large = b;
								mid = a;
								small = c;
							}
				System.out.println("정렬된 숫자: " + small +" "+ mid +" "+ large);
			}
	}
}